package 结构器模式.装饰者模式;

/**
 * @Description TODO
 * @Author shallow
 * @Date 2023/3/5 16:45
 */

public class test {
    public static void main(String[] args) {
        //点一份炒饭
        FastFood food = new FriedRice();
        System.out.println(food.getDesc()+"     "+food.cost());

        System.out.println("===========================");

        //炒饭里加一个鸡蛋
        food = new Egg(food);
        System.out.println(food.getDesc()+"     "+food.cost());
    }
}
